Restore capability to export metadata sections (previously headers) to html#445
Merged
climbfuji merged 2 commits intoApr 12, 2022
Merged
Conversation
gold2718
approved these changes
Mar 28, 2022
Collaborator
gold2718
left a comment
There was a problem hiding this comment.
A couple of suggestions but basically okay.
| """Return True iff <test_val> refers to a Fortran scalar.""" | ||
| return check_fortran_ref(test_val, None, False) is not None | ||
|
|
||
| def to_html(self, outdir, props): |
Collaborator
There was a problem hiding this comment.
I would move this up to where the other active routines are, say right after write_to_file.
| # Write table header | ||
| header = "<tr>" | ||
| for prop in props: | ||
| header += "<th>{}</th>".format(prop) |
Collaborator
There was a problem hiding this comment.
I have been converting to f strings, this seems like a good place.
Collaborator
Author
There was a problem hiding this comment.
I have adopted f strings in this PR, thanks for the suggestion.
Collaborator
Author
|
@mkavulich @grantfirl I addressed @gold2718's review comments, now it is your turn ... |
grantfirl
approved these changes
Mar 31, 2022
Collaborator
grantfirl
left a comment
There was a problem hiding this comment.
Looks OK to me. I did not test myself, but others have reported success, so approved.
Collaborator
|
@climbfuji Could we combine this with #443 for the purposes of merging with UFS? |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore capability to export metadata sections (previously headers) to html.
The capability to write metadata sections to html was removed with the refactoring of the
feature/capgenbranch, subsequently slipped the reviews and got merged into main. As a result, themetadata2html.pyscript, required to generate scientific documenation (especially at times of releases!) doesn't work anymore. This PR restores the capability by putting the original code blocks back into the metadata sections (previously these were called headers).I ran this in the two supported ways within the UFS. Once merged, the code will work like this. Maybe there are some slight path changes compared to what is in the CCPP tech doc - @mkavulich FYI.
Batch mode using
ccpp_prebuild_config.py:Single-file mode:
User interface changes?: Yes (I assume some of the paths have changed compared to the documentation)
Closes #444
Testing: see above. The code changes will also be tested within the ufs-weather-model regression testing environment. I recommend that we pull this PR into #443, since #443 and associated PRs do not change the baselines. Note that #444 is required for CCPP release v6.
Other testing:
ccpp_prebuild.py:capgen.py:test removed: none
unit tests: none
system tests: none
manual testing: see above